Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Geometric Objects

QuickDraw 3D provides a number of general routines for manipulating its primitive geometric objects.

Q3Geometry_GetType

You can use the Q3Geometry_GetType function to get the type of a geometric object.

TQ3ObjectType Q3Geometry_GetType (TQ3GeometryObject geometry);
geometry
A geometric object.

DESCRIPTION

The Q3Geometry_GetType function returns, as its function result, the type of the geometric object specified by the geometry parameter. The types of geometric objects currently supported by QuickDraw 3D are defined by these constants:

kQ3GeometryTypeBox
kQ3GeometryTypeCone
kQ3GeometryTypeCylinder
kQ3GeometryTypeDisk
kQ3GeometryTypeEllipse
kQ3GeometryTypeEllipsoid
kQ3GeometryTypeGeneralPolygon
kQ3GeometryTypeLine
kQ3GeometryTypeMarker
kQ3GeometryTypeMesh
kQ3GeometryTypeNURBCurve
kQ3GeometryTypeNURBPatch
kQ3GeometryTypePixmapMarker
kQ3GeometryTypePoint
kQ3GeometryTypePolygon
kQ3GeometryTypePolyhedron
kQ3GeometryTypePolyLine
kQ3GeometryTypeTorus
kQ3GeometryTypeTriangle
kQ3GeometryTypeTriGrid
kQ3GeometryTypeTriMesh

If the specified geometric object is invalid or is not one of these types, Q3Geometry_GetType returns the value kQ3ObjectTypeInvalid .

Q3Geometry_GetAttributeSet

You can use the Q3Geometry_GetAttributeSet function to get the attribute set associated with an entire geometric object.

TQ3Status Q3Geometry_GetAttributeSet (
                     TQ3GeometryObject geometry,
                     TQ3AttributeSet *attributeSet);
geometry
A geometric object.
attributeSet
On exit, the set of attributes of the specified geometric object.

DESCRIPTION

The Q3Geometry_GetAttributeSet function returns, in the attributeSet parameter, the set of attributes currently associated with the geometric object specified by the geometry parameter. The reference count of the set is incremented.

Q3Geometry_SetAttributeSet

You can use the Q3Geometry_SetAttributeSet function to set the attribute set associated with a geometric object.

TQ3Status Q3Geometry_SetAttributeSet (
                     TQ3GeometryObject geometry,
                     TQ3AttributeSet attributeSet);
geometry
A geometric object.
attributeSet
A set of attributes.

DESCRIPTION

The Q3Geometry_SetAttributeSet function sets the attribute set of the geometric object specified by the geometry parameter to the set specified by the attributeSet parameter.

Q3Geometry_Submit

You can use the Q3Geometry_Submit function to submit a retained geometric object for drawing, picking, bounding, or writing.

TQ3Status Q3Geometry_Submit (
                     TQ3GeometryObject geometry,
                     TQ3ViewObject view);
geometry
A geometric object.
view
A view.

DESCRIPTION

The Q3Geometry_Submit function submits the geometric object specified by the geometry parameter for drawing, picking, bounding, or writing according to the view characteristics specified in the view parameter. The geometric object must have been created by a call that creates a retained object (for example, Q3Point_New ).

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |